#include "stm32f10x.h"                  // Device header
#include "delay.h"

void Delay_Us(int nus)
{
	SysTick->VAL = 0;
	SysTick->LOAD = 9 * nus;
	SysTick->CTRL = 1;
	while((SysTick->CTRL & 0x00010000) != 0x00010000);
}
void Delay_Ms(int nms)
{
	while(nms--)
	{
		Delay_Us(1000);
	}
}
